import java.rmi.*;
import java.rmi.server.*;

/**
 * Created with IntelliJ IDEA.
 * User: Tylaar
 * Date: 9/9/12
 * Time: 8:22 PM
 * To change this template use File | Settings | File Templates.
 */
public class LittleNodeStubImpl extends UnicastRemoteObject implements LitteNodeStubInterface{

    private long nodeId;
    private String welcome_str = "A welcome from :";

    protected LittleNodeStubImpl(long nodeId) throws RemoteException {
        super();
        this.nodeId = nodeId;
    }

    @Override
    public void sayHi(Long node_id) throws RemoteException{
        //To change body of implemented methods use File | Settings | File Templates.
        System.out.println("Thread " + nodeId + ": " + welcome_str + node_id);
    }

    @Override
    public void receiveHi(Long node_id) throws RemoteException{
        //To change body of implemented methods use File | Settings | File Templates.
        System.out.println("Thread " + nodeId + ": " + welcome_str + node_id);
    }
}
